package com.example.jpademo.repository;

import com.example.jpademo.domain.DemoUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @ClassName TestClassRepository
 * @Description TODO
 * @Author zhangrenhao
 * @Date 2024/7/31 9:50
 */
public interface DemoUserRepository extends JpaRepository<DemoUser, String> {


    @Query(value = "select * from demo_user", nativeQuery = true)
    List<DemoUser> findByName(String name);
}
